home *** CD-ROM | disk | FTP | other *** search
- /*
- VirtualWorld.h
-
- Interface to the Virtual world maintaining class.
-
- by Patrick Beard.
-
- ©1990 by Patrick C. Beard. All rights reserved.
- */
-
- #ifndef __VIRTUALWORLD__
- #define __VIRTUALWORLD__
-
- #include <Memory.h>
- #include <StdDef.h>
-
- #include "Relocatable.h"
-
- class VirtualWorld : public Relocatable {
- public:
- VirtualWorld(Boolean worldFloats); // constructor sets up world.
- ~VirtualWorld(); // destructor destroys it.
-
- // main functions, Enter sets A5 to point to our world.
- void Enter(); // go into our world.
- void Leave(); // restore old A5 context.
-
- // error reporting.
- OSErr Result() { return error; }
-
- private:
- OSErr error; // the last error that occurred.
- Boolean codeFloats; // whether we have to call the vtable init.
- long worldSize; // how big our globals are.
- Ptr ourA5; // the storage for the virtual world.
- Ptr oldA5; // old A5.
- };
-
- #endif
-